#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

#define DISTANCE 6

typedef int ElementType;
typedef struct QUEUE Queue;
typedef _Bool Map;
struct QUEUE {
	ElementType elm;
	Queue *next;
	Queue *tail;
};

Queue* QueueInit(void);
_Bool  QueueEmpty(Queue*);
void   EnQueue(Queue*,ElementType);
ElementType DeQueue(Queue*);
int NearNode(int n,Map (*)[n+1],int);

Queue* QueueInit(void){
	Queue* new=malloc(sizeof(Queue));
	new->next=NULL;
	new->tail=new;
	return new;
}
_Bool QueueEmpty(Queue *q){
	if( !q->next )
		return true;
	return false;
}
void EnQueue(Queue *q,ElementType elm){
	Queue *new=malloc(sizeof(Queue));
	new->elm=elm;
	new->next=NULL;
	q->tail->next=new;
	q->tail=new;
	return;
}
ElementType DeQueue(Queue *q){
	ElementType ret=q->next->elm;
	Queue *tmp=q->next;
	q->next=q->next->next;
	free(tmp);
	if(!q->next)
		q->tail=q;
	return ret;
}

int main(void){
	int N,M;
	scanf("%d %d",&N,&M);
	Map map[N+1][N+1];
	for(int i=0;i<=N;i++)
		for(int j=0;j<=N;j++)
			map[i][j]=false;
	int e1,e2;
	for(int i=0;i<M;i++){
		scanf("%d %d",&e1,&e2);
		map[e1][e2]=map[e2][e1]=true;
	}
/*
for(int i=1;i<=N;i++){
for(int j=1;j<=N;j++)
printf("%d ",map[i][j]?1:0);
printf("\n");
}*/


	for(int i=1;i<=N;i++){
		printf("%d: %.2f%%\n",i,NearNode(N,map,i)*100.0/N);
	}
	return 0;
}
int NearNode(int n,Map (*map)[n+1],int index){
	int NodeCount=0;
	int visited[n+1];
	for(int i=1;i<=n;i++)visited[i]=-1;
	Queue *q=QueueInit();
	EnQueue(q,index);
	visited[index]=0;
	ElementType e;
	while( !QueueEmpty(q) ){
		e=DeQueue(q);
		if( visited[e] > DISTANCE )break;
		NodeCount++;
		for(int i=1;i<=n;i++){
			if( map[e][i] && -1==visited[i] ){
				visited[i]=visited[e]+1;
				EnQueue(q,i);
			}
		}
	}
	return NodeCount;
}
